import React, { Component } from 'react'
import {
  SafeAreaView,
  ScrollView,
  StatusBar,
  StyleSheet,
  Text,
  useColorScheme,
  View,
  Button,
  Alert,
  Switch,
  ActivityIndicator,
  Platform,
} from 'react-native'

export default function index() {

  // 判断操作系统
  if (Platform.OS === 'android') {
    Alert.alert('android')
  } else if (Platform.OS === 'ios') {
    Alert.alert('ios')
  } else {
    Alert.alert('other')
  }

  return (
    <View style={[styles.container]}>
      <ActivityIndicator
        color='#5e7ce0'
        size={'large'}
      />

      <ActivityIndicator
        color='#5e7ce0'
        size={'small'}
      />

      <ActivityIndicator
        color='red'
        size={80} // 由数字指定大小，仅在 Android 应用下有效
      />
    </View>
  )
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    justifyContent: 'space-around',
  },
})
